from ..base import base
from flask_login import login_required
from ..models import DictData

from exts import success


@base.route('/api/solution_type/list', methods=['GET'])
@login_required
def solution_type_list_api():
    '''
    添加解决方案类型信息
    :return:
    '''
    list = DictData.query.filter_by(dict_type='solution_type').all()
    return success(list)


@base.route('/api/product_type/list', methods=['GET'])
@login_required
def product_type_list_api():
    '''
    获取产品类型
    :return:
    '''
    list = DictData.query.filter_by(dict_type='product_type').all()
    return success(list)
